<html>
<head>
<title>CQTileEd</title>
<script>
function tileObj(id,x,y,col) {
	this.id = id;
	this.x = x;
	this.y = y;
	this.collision = col;
}

a = new tileObj('features',0,0,false);
w = new tileObj('features',32*4,0,true);
d = new tileObj('features',32*1,32*7,false)
l = new tileObj('features',32*3,32*3,false)
s = new tileObj('features',32*3,32*9,false)

var tileMap =
[	[w,w,w,w,w,w,w,w,s,w],
	[w,a,a,a,a,a,a,l,l,w],
	[w,a,a,a,a,a,a,a,a,w],
	[w,a,a,a,a,a,a,a,a,w],
	[w,a,a,a,a,a,a,a,a,w],
	[w,a,a,a,a,a,a,a,a,w],
	[w,a,a,a,a,a,a,a,a,w],
	[w,a,a,a,w,w,a,w,w,w],
	[w,a,a,a,w,a,a,a,l,w],
	[w,w,w,w,w,d,w,w,w,w] ]


function init(){
	var ctx = document.getElementById('map').getContext('2d');
	for(i = 0; i < 10; i++){
		for(j = 0; j < 10; j++){
			ctx.drawImage(document.getElementById(tileMap[i][j].id),tileMap[i][j].x, tileMap[i][j].y,32,32,j*32,i*32,32,32)
		}
	}
}

</script>

</head>
<body>
<canvas id='map' height="320" width="320" style="border: 1px solid black;">testing</canvas>
<img id="features" src="dg_features.png" onload="init()"/>
</body>
</html>